export type MemuMode = 'vertical' | 'horizontal';
export type OnSelect = (selectIndex: string) => void;

export interface MenuProps {
    defaultIndex?: string;  // 默认选中
    mode?: MemuMode;        // 菜单模式
    onSelect?: OnSelect;    // 切换菜单项的回调函数
    className?: string;
    style?: React.CSSProperties;
    children?: React.ReactNode;
}

export const MenuDefaultProps: MenuProps = {
    defaultIndex: '0',
    mode: 'horizontal',
}

export interface MenuItemProps {
    index?: string,
    disabled?: boolean,
    className?: string;
    style?: React.CSSProperties;
    children?: React.ReactNode;
}

export interface SubMenuProps {
    title?: string,
    index?: string,
    disabled?: boolean,
    className?: string;
    style?: React.CSSProperties;
    children?: React.ReactNode;
    defaultOpenMenus?: boolean;
}